package com.lcy.web.controller

import com.lcy.web.base.EmptyStringFilter
import com.lcy.web.bean.User
import org.springframework.stereotype.Controller
import org.springframework.validation.annotation.Validated
import java.util.*
import javax.validation.Valid
import javax.validation.constraints.NotNull
import javax.validation.constraints.Size
import javax.validation.executable.ValidateOnExecution
import javax.ws.rs.*
import javax.ws.rs.core.MediaType
import javax.ws.rs.core.Response

/**
 * Created by loucunyin on 6/24/17.
 */
@Controller
@Path("/")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@EmptyStringFilter
@Validated
open class RootController{
    @GET
    @Path("error")
    fun error():Response{

        return Response.status(401)
                .encoding("utf-8")
                .entity("401")
                .build()
    }
}